package yf.mall.service.impl;

import com.yf.service.impl.BaseServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import yf.mall.dao.AccCardDao;
import yf.mall.entity.AccCardEntity;
import yf.mall.service.AccCardService;

import java.util.List;

/**
 * 银行卡Service实现类
 *
 * @author hxf
 * @email 505860922@qq.com
 * @date Fri Jul 10 10:01:37 CST 2020
 */
@Service
public class AccCardServiceImpl extends BaseServiceImpl<AccCardEntity> implements AccCardService {

    private AccCardDao accCardDao;


    @Autowired
    public void setDao(AccCardDao accCardDao) {
        this.accCardDao = accCardDao;
        super.setBaseDao(accCardDao);
    }


    /**
     *
     *
     @Override
     List<AccCardVo> queryListVo(AccCardVo accCardVo){
            return accCardDao.queryListVo(accCardVo);
     }

     @Override
     AccCardVo getVo(Long id){
                return accCardDao.getVo(id);
    }

     **/


    /**内部方法**/



    /**外部方法实现**/


    /**
     * Long
     * 查询所有的银行卡信息
     * @param userId
     * @return
     */
    @Override
    public List<AccCardEntity> accList(long userId) {
        List<AccCardEntity> accCardEntities = this.accCardDao.queryByUserId(userId);
        return accCardEntities;
    }

    @Override
    public void deleteByUserId(long userId, Long id) {
        this.accCardDao.deleteByUserId(userId,id);
    }

}
